<?php
    include("Mysql.php");
    $id = $_GET['id'];
    
    if (!empty ($id))
    {
        Mysql::openConnection();
        $con = Mysql::getConnection();
        $sql = "UPDATE job
                SET abortrequested=1
                WHERE idjob=" . $id;
        mysql_query($sql, $con);
        Mysql::closeConnection();
        
        echo "Aborting render job with 'idjob': " . $id . "<br>";
    }
    else
    {
        echo "No ID specified!<br>";
    }
    
    echo "<a href='client.php'>Back</a>";
?>
